package 抽象类GeometricFigure及其子类;

public class EquilateralTriangle extends GeometricFigure{
    private double side;
    public EquilateralTriangle(double side){
        this.side = side;
    }

    @Override
    public double getArea() {
        return 1/4.0 * Math.sqrt(3.0) * side * side;
    }

    @Override
    public double getPerimeter() {
        return 3 * side;
    }
}